package javabasics.designpattern.singleton;

/**
 * @Author suxiaoxiao
 * @Date 2019/5/30 22:59
 * @Version 1.0
 */
public class LazySingletonThread implements Runnable {

    private Thread t;

    @Override
    public void run() {
        Long begintime = System.currentTimeMillis();
        for (int i = 0; i < 100000; i++) {
//            Singleton.getInstance();
//            LazySingleton.getInstance();
            StaticSingleton.getInstance();
        }
        System.out.println("spend:" + (System.currentTimeMillis() - begintime));
    }

}
